package com.ocom.company.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ocom.common.dto.CompanyInfoDto;
import com.ocom.common.entity.master.EntityCompanyList;
import com.ocom.common.pojo.company.CompanyListPojo;
import com.ocom.common.request.company.GetCompanySummaryRequest;
import com.ocom.common.vo.CompanyListInfoVo;
import com.ocom.common.vo.company.ComStatusCountVo;

import java.util.List;
import java.util.Map;


public interface CompanyListInfoService extends IService<EntityCompanyList> {

    /**
     * 是否存在企业名
     * @param companyName
     * @return
     */
    boolean isExistName(String companyName);

    /**获取单位信息*/
    public List<EntityCompanyList> GetCompanyListInfo(CompanyListInfoVo companyListInfoVo);


    EntityCompanyList GetCompanyListInfo(Long companyId);

    /**
     * 添加总库单位信息
     * */
    public Map<String,Object> AddCompanyListInfo(CompanyInfoDto companyInfo);

    /**
     * 更新总库单位信息
     * */
    public Map<String,Object>  UpdateCompanyListInfo(CompanyInfoDto companyInfo);

    /**
     * 获取单位列表信息
     * @param ids
     * @return
     */
    public List<CompanyListPojo> getCompanyList(List<Long> ids);

    public List<CompanyListPojo> getCompanyList(String openid);

    public EntityCompanyList getCompanyList(Long comId);
    /**
     * 更新颜色
     * @param companyId
     * @param colorNo
     */
    void modifyColor(Long companyId,String colorNo);

    /**
     * 更新名称
     * @param companyId
     * @param companyName
     */
    void modifyName(Long companyId,String companyName);


    /**
     * 更新名称
     * @param companyId
     * @param pId
     */
    void modifyPid(Long companyId,Long pId);


    List<EntityCompanyList> getCompanyListByAgentId(Long agentId);


    public List<EntityCompanyList> getAgents();

    List<EntityCompanyList> getCompanySummary(GetCompanySummaryRequest getCompanySummaryRequest);


    /**
     * 更新总库单位信息
     * */
    public Boolean  updateCompanyListById(EntityCompanyList entityCompanyList);


    public List<ComStatusCountVo> getCompanyList(Long beginComId, Long endComId);


}
